package MathHomeWorkTest;

import java.util.Scanner;

/*
输入正整数N，求出它的倒数，如果是无限循环小数，则求出所有的循环位，并指出循环起始位。
 */
public class MathTest22 {
    public static void main(String[] args){
        Scanner s = new Scanner(System.in);
        int num = s.nextInt();
        int one = 1;
        int divide = 0;
        int i = 0;
        int j = 0;
        int limit = 0;
        int[] arrYu = new int[100];
        int[] arrShang = new int[100];

        while(true){
            one = one % num;
            arrYu[i] = one;
            i++;
            one *= 10;
            divide = one / num;
            arrShang[j] = divide;
            j++;
            if(one == 0){
                limit = -1;
                return;
            }

        }
    }
}
